{% extends "common/layout_main.html" %}
{% block content %}
    <div class="row  border-bottom">
        <div class="col-lg-12">
            <div class="tab_title">
                <ul class="nav nav-pills">
                    <li class="current">
                        <a href="/sw/">返回主页</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="form-horizontal wrap_account_set">

        <h3 class="text-center">交换机管理设置</h3>

        <div class="form-group">
            <label class="col-sm-2 control-label">IP地址:</label>
            <div class="col-sm-10">
                <textarea name="ipaddr" class="form-control" rows='5' placeholder="请输入管理ip地址~~"
                          {% if info %}readonly="readonly"{% endif %}>{{ info.ipaddr }}</textarea>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <span class="help-block">密码相同的同类型交换进可以同时添加，IP地址必须以','分隔，如：192.168.2.1,192.168.2.2</span>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">是否核心交换机:</label>
            <div class=" col-sm-10">
                <div class="checkbox">
                    <label>
                        <input type="checkbox" id="iscore" {% if info.iscore==1 %}checked{% endif %}> 核心交换机
                    </label>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">登录名:</label>
            <div class="col-sm-10">
                <input type="text" name="login_name" class="form-control" autocomplete="off" placeholder="请输入登录名~~"
                       value="{{ info.user }}">
            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-2 control-label">登录密码:</label>
            <div class="col-sm-10">
                <input type="password" name="login_pwd" class="form-control" autocomplete="new-password"
                       placeholder="请输入登录密码~~" value="******">
            </div>

        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">备注:</label>
            <div class="col-sm-10">
                <input type="text" name="note" class="form-control" autocomplete="off" placeholder="请输入备注~~"
                       value="{{ info.note }}">
            </div>

        </div>
        <input type="hidden" name="id" value="{{ info.id }}">
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button class="btn btn-w-m btn-outline btn-primary save">保存</button>
            </div>
        </div>

    </div>
{% endblock %}
{% block js %}
    <script src="{{ buildStaticUrl('/js/swip/set.js') }}"></script>
{% endblock %}